<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index');

	$router->resources([
		'users'=> UserController::class,
		'invitation_code' => InvitationCodeController::class,
		'city' => CityController::class,
		'pickup_site' => PickupSiteController::class,
        'pickup_user' => PickupUserController::class,
        'pickup_check_history' => PickupCheckHistoryController::class,
        'food' => FoodController::class,
        'goods' => GoodsController::class,
        'sport' => SportController::class,
        'order' => ShoppingOrderController::class,
        'cookbook' => CookbookController::class,
        'ad' => AdController::class,
        'article' => ArticleController::class,
        'gym' => GymController::class,
        'ticket' => GymTicketController::class,
        'user-ticket' => UserTicketController::class

	]);
    $router->get('user-ticket/{id}/check', 'UserTicketController@check');
	$router->any('api/provinces','CityController@provinces');
    $router->get('api/cities', 'ApiController@cities');
    $router->get('api/sites', 'ApiController@sites');
    $router->get('api/gyms', 'ApiController@gyms');
});
